{% extends 'backbase.html' %}
{% block header %}
    <!-- 在这里编写自己的css和js -->
{% endblock %}
{% block content %}
    <h1>招聘列表</h1>
    <table border="1">
        <tr><th>编号</th><th>标题</th><th>公司地址</th><th>薪水</th><th>要求</th><th>邮箱</th><th>日期</th><th>操作</th></tr>
        {% for recruit in page %}
            <tr style="background-color:{% cycle 'white' 'lavender' %};">
                <td>{{recruit.id}}</td>
                <td>{{recruit.title}}</td>
                <td>{{recruit.address}}</td>
                <td>{{recruit.salary}}</td>
                <td>{{recruit.intro}}</td>
                <td>{{recruit.email}}</td>
                <td>{{recruit.create_time|date:'Y-m-d'}}</td>
                <td>
                    <a href="/moddata/{{recruit.id}}">修改</a>|
                    <a href="/deldata/{{recruit.id}}/{{page.number}}" onclick="return confirm('确认删除该记录吗？');">删除</a>
                </td>
            </tr>
        {% endfor %}
    </table>
    {% if page.has_previous %}
    |<a href="/zpgg/1">第一页</a>
    |<a href="/zpgg/{{page.previous_page_number}}">上一页</a>
    {% endif %}
    |当前页码：{{page.number}}/{{page.paginator.num_pages}}|
    {% if page.has_next %}
        <a href="/zpgg/{{page.next_page_number}}">下一页</a>
        |<a href="/zpgg/{{page.paginator.num_pages}}">最末页</a>|
    {% endif %}
    <hr>
    <p><a href="/adddata/">添加公告</a></p>
{% endblock %}